grammar Graphics;

options {
    language = C;
}

@includes {
#include <iostream>
}

file : command+;
command
    	: LINECOMMAND FROMCOMMAND a=point 'to' b=point  NEWLINE { std::cout << $a.text->chars << " -> " << $b.text->chars << std::endl; } ;
point 
	: INT ',' INT ;
INT : '0'..'9'+
	;

LINECOMMAND
	: 'line'
	;
FROMCOMMAND : 'from' ;
	
NEWLINE : (('\u000C')?('\r')? '\n')* ;

WS : (' ' | '\t')+ { $channel = HIDDEN; } ;
